package com.hpq.common.constant;

public class RedisConstant {
    private static final String PREFIX = "coffeechat:";
    /**
     * 用户信息
     */
    public static final String USER_INFO_STRING = "userInfo:uid_%d";
    /**
     * 用户token键值
     */
    public static final String USER_TOKEN_KEY = "userToken:uid_%d";
    /**
     * 房间详情
     */
    public static final String ROOM_INFO_STRING = "roomInfo:roomId_%d";
    /**
     * 群聊详情
     */
    public static final String GROUP_INFO_STRING = "groupInfo:roomId_%d";

    /**
     * 热门房间列表
     */
    public static final String HOT_ROOM_ZET = "hotRoom";
    /**
     * 群组详情
     */
    public static final String GROUP_FRIEND_STRING = "groupFriend:roomId_%d";
    /**
     * 在线用户列表
     */
    public static final String ONLINE_UID_ZET = "online";


    /* *
     * 获取redis key
     * @param key
     * @param objects
     * @return
     */
    public static String getKey(String key, Object...objects){
        return PREFIX + String.format(key, objects);
    }
}
